<%@ page import="com.liliya.service.impl.AdServiceImpl" %>
<%@ page import="com.liliya.service.AdService" %>
<%@ page import="com.liliya.pojo.Ad" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/4
  Time: 14:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>广告管理</title>
    <style>
        tr td:first-child, .blue_text {
            background: rgb(112, 144, 183);
            color: #ffffff;
        }

        .blue_text {
            width: 100px;
            background: rgb(112, 144, 183);
        }

        table, tr, td {
            border: 1px solid rgb(112, 144, 183);
            text-align: center;
        }

        table {
            margin: auto;
            width: 650px;
        }

        .aaa {
            padding: 10px;
        }
        .main {
            border: 2px solid cornflowerblue;
        }
    </style>
</head>
<body>

<div style="width: 760px">
    <%@ include file="../common/header.jsp" %>
    <div class="main">
        <div style="margin: 10px 20px">
            <img src="../img/adver.gif" alt="广告管理">
        </div>
        <div style="text-align: center;font-size: 20px;margin-bottom: 20px">
            <span class="aaa">
            <a href="addad.jsp">添加广告</a>
            </span>
            <span class="aaa">
            <a href="./show?adnum=${ad.adnum}">显示广告</a>
            </span>
        </div>
        <table cellspacing="0" cellpadding="12">
            <tr>
                <td class="blue_text">广告编号</td>
                <td>${ad.adnum}</td>
                <td class="blue_text">图片名称</td>
                <td>${ad.adname}</td>
            </tr>
            <tr>
                <td class="blue_text">广告链接</td>
                <td colspan="3">${ad.adlink}</td>

            </tr>
            <tr>
                <td class="blue_text">图片显示</td>
                <td colspan="3">
                    <img width="350px" src="${pageContext.request.contextPath}${ad.adlink}" alt="图片加载失败">
                </td>
            </tr>
            <tr>
                <td class="blue_text">ALT内容</td>
                <td colspan="3">${ad.adalt}</td>
            </tr>
            <tr>
                <td class="blue_text">备注说明</td>
                <td colspan="3">${ad.adcomment}</td>
            </tr>
            <tr>
                <td class="blue_text">添加日期</td>
                <td>${ad.addatetime}</td>
                <td class="blue_text">显示次数</td>
                <td>${ad.adshowtime}</td>
            </tr>
            <tr>
                <td style="background-color:#fff; color: red" colspan="2"><a href="./del?adnum=${ad.adnum}">删除</a> </td>
                <td style="background-color:#fff; color: red" colspan="2"><a href="./update?adnum=${ad.adnum}">修改这个广告</a> </td>
            </tr>
        </table>
    </div>

    <div style="text-align: center;padding: 10px">
        <span class="aaa"><a href="./manage?p=1">第一页</a></span>
        <span class="aaa"><a href="./manage?p=${pre}">上一页</a></span>
        <span class="aaa"><a href="./manage?p=${next}">下一页</a></span>
        <span class="aaa"><a href="./manage?p=${total}">最末页</a></span>
    </div>
    <%@ include file="../common/footer.jsp" %>
</div>
</body>
</html>
